package org.jeecg.modules.inOrder.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.jeecg.modules.inOrder.entity.InOrderDetail;
import org.jeecg.modules.inOrder.mapper.InOrderDetailMapper;
import org.jeecg.modules.inOrder.service.IInOrderDetailService;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 入库单明细表
 * @Author: jeecg-boot
 * @Date:   2024-05-06
 * @Version: V1.0
 */
@Service
public class InOrderDetailServiceImpl extends ServiceImpl<InOrderDetailMapper, InOrderDetail> implements IInOrderDetailService {

	@Autowired
	private InOrderDetailMapper inOrderDetailMapper;

	@Override
	public List<InOrderDetail> selectByMainId(String mainId) {
		return inOrderDetailMapper.selectByMainId(mainId);
	}

	@Override
	public List<InOrderDetail> selectByMainIdAndPalletCode(String id, String palletCode) {
		LambdaQueryWrapper<InOrderDetail> wrapper = Wrappers.lambdaQuery();
		wrapper.eq(InOrderDetail::getInOrderId, id);
//		wrapper.eq(InOrderDetail::getPalletCode, palletCode);
		return inOrderDetailMapper.selectList(wrapper);
	}
}
